﻿using System;
using System.Linq;
using System.IO;
using System.IO.IsolatedStorage;
using System.Collections.Generic;
using Microsoft.LightSwitch;
using Microsoft.LightSwitch.Framework.Client;
using Microsoft.LightSwitch.Presentation;
using Microsoft.LightSwitch.Presentation.Extensions;
namespace LightSwitchApplication
{
    public partial class EditableCustomers
    {


        partial void gridAddAndEditNew_Execute()
        {
            this.Application.ShowCreateNewCustomer();
        }

        partial void gridEditSelected_CanExecute(ref bool result)
        {
            // Write your code here.

        }

        partial void gridEditSelected_Execute()
        {
            if (CustomersByName.SelectedItem != null) this.Application.ShowCustomerDetail(CustomersByName.SelectedItem.Id);
        }

        partial void ImportFromExcel_Execute()
        {
            ExcelImporter.Importer.ImportFromExcel(CustomersByName);
        }

    }
}
